<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      var str = prompt("请输入你想要查询的水果");
      switch (str) {
        case "苹果":
          alert("3.3");
          break;
        case "西瓜":
          alert("4.4");
          break;
        case "香蕉":
          alert("5.5");
          break;
        default:
          alert("gun");
          break;
      }
    </script>
  </head>
  <body></body>
</html>
